package day7;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestStreamReader {
    public static void main(String[] args) {
        try {
            //OutputStreamWriter out=new OutputStreamWriter()
            InputStreamReader r=new InputStreamReader(new FileInputStream("chat.txt"));
            int ch= 0;
            while ((ch=r.read())!=-1){
                System.out.print((char)ch);
            }
            r.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
